package com.csdj.t309tgspringboot.entity;

import java.io.Serializable;

public class Comments implements Serializable {
    private Integer id;

    private String commentsTitle;

    private Integer userId;

    private Integer postId;

    private Integer commentsPid;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCommentsTitle() {
        return commentsTitle;
    }

    public void setCommentsTitle(String commentsTitle) {
        this.commentsTitle = commentsTitle == null ? null : commentsTitle.trim();
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getPostId() {
        return postId;
    }

    public void setPostId(Integer postId) {
        this.postId = postId;
    }

    public Integer getCommentsPid() {
        return commentsPid;
    }

    public void setCommentsPid(Integer commentsPid) {
        this.commentsPid = commentsPid;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Comments other = (Comments) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCommentsTitle() == null ? other.getCommentsTitle() == null : this.getCommentsTitle().equals(other.getCommentsTitle()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getPostId() == null ? other.getPostId() == null : this.getPostId().equals(other.getPostId()))
            && (this.getCommentsPid() == null ? other.getCommentsPid() == null : this.getCommentsPid().equals(other.getCommentsPid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCommentsTitle() == null) ? 0 : getCommentsTitle().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getPostId() == null) ? 0 : getPostId().hashCode());
        result = prime * result + ((getCommentsPid() == null) ? 0 : getCommentsPid().hashCode());
        return result;
    }
}